package cn.tedu.csmall.product.ex;

import cn.tedu.csmall.product.web.ServiceCode;

/**
 * @author liyang
 * @version 1.0
 * @package cn.tedu.csmall.product.ex
 * @file ServiceException.java
 * @description
 * @time 2024/9/2 下午4:55
 */
public class ServiceException extends RuntimeException {
//    9.8新增属性
    private ServiceCode serviceCode;

    public ServiceException() {
    }

    public ServiceException(ServiceCode serviceCode, String message) {
        super(message);
        this.serviceCode = serviceCode;
    }

    public ServiceCode getServiceCode() {
        return serviceCode;
    }

    public ServiceException(String message, Throwable cause) {
        super(message, cause);
    }

    public ServiceException(Throwable cause) {
        super(cause);
    }

    public ServiceException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
}
